package models.send;

import models.Models.Email;
import models.SystemModels.SystemUserDetails;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by Administrator on 2018-07-29.
 */
public class SystemAllUser {
    public static boolean AllUserEmail(String SystemUserEmailTitle,String SystemUserEmailContent){
        List<SystemUserDetails> systemUserDetailsList= new ArrayList<SystemUserDetails>();
        if (systemUserDetailsList.isEmpty()){
            return  false;
        }else{
           try{
               for (int i =0; i<systemUserDetailsList.size();i++){
                   Email email = new Email();
                   email.msg = SystemUserEmailContent;
                   email.title =SystemUserEmailTitle;
                   email.account = systemUserDetailsList.get(i).Email;
                   models.send.email.MsgEmail(email);
               }
           }catch (Exception ex){
               return  false;
           }
        }
        return  true;
    }
}
